package goleetcode

func checkRecord_(s string) bool {
	aCount := 0
	lCount := 0
	for _, r := range s {
		if r == 'L' {
			lCount++
		} else {
			lCount = 0
		}
		if lCount >= 3 {
			return false
		}
		if r == 'A' {
			aCount++
		}
		if aCount >= 2 {
			return false
		}
	
	}
	return true
}